projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28445ae
)
Fix memory leak of cwd string in emacsclient (Bug#26628)
author
Anders Waldenborg
<anders@0x63.nu>
Sun, 23 Apr 2017 19:15:46 +0000
(21:15 +0200)
committer
Noam Postavsky
<npostavs@gmail.com>
Thu, 1 Jun 2017 02:58:30 +0000
(22:58 -0400)
* lib-src/emacsclient.c (main): emacsclient retrieves the current
working directory using get_current_dir_name which returns a newly
allocated string. Make sure this string is freed before exiting.
Copyright-paperwork-exempt: yes
lib-src/emacsclient.c
patch
|
blob
|
history
diff --git
a/lib-src/emacsclient.c
b/lib-src/emacsclient.c
index c21ee6bd39588073623f062b6dc1489ea05da66b..3a0715f137e8c6fb0813b7e43d90bcba3baa0ec5 100644
(file)
--- a/
lib-src/emacsclient.c
+++ b/
lib-src/emacsclient.c
@@
-1945,6
+1945,8
@@
main (int argc, char **argv)
if (rl < 0)
exit_status = EXIT_FAILURE;
+ free (cwd); /* Keep leak checkers happy. */
+
CLOSE_SOCKET (emacs_socket);
return exit_status;
}